package cn.cena.feign.client;

import cn.cena.domain.Login;
import cn.cena.dto.RelationLogin2MealDto;
import cn.cena.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "auth-service",fallbackFactory = LoginFeignClientFallbackFactoy.class)
@RequestMapping("/login")
public interface LoginFeignClient {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    @RequestMapping(value="/saveLoginAndMeal",method= RequestMethod.POST)
    AjaxResult saveLoginAndMeal(@RequestBody RelationLogin2MealDto login2MealDto);
}

